package com.sise.cn.api.common.config;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName LoginConfig
 * @Description
 * @Author CCJ
 * @Date 2020/6/9 19:08
 **/
@Data
@ToString
@Configuration
@ConfigurationProperties(prefix = "product.login")
@EnableConfigurationProperties({LoginConfig.class})
public class LoginConfig {
    private Integer failCount = 3;

    @NestedConfigurationProperty
    private BaseLoginConfig admin = new BaseLoginConfig(true);

    @NestedConfigurationProperty
    private BaseLoginConfig customer = new BaseLoginConfig(false);

}
